import { _decorator, Component, Node, director, cclegacy } from 'cc'
const { ccclass, property } = _decorator

import FaderManager from '../../Runtime/FaderManager'

@ccclass('StartManager')
export class StartManager extends Component {
  onLoad() {
    FaderManager.Instance.fadeOut()
    this.node.once(Node.EventType.TOUCH_END, this.handleStart, this)
  }
  handleStart() {
    FaderManager.Instance.fadeIn()
    // 跳转场景
    director.loadScene('Battle')
  }
}
